home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950528-19950726 / 000228_news@columbia.edu_Tue Jun 27 08:51:12 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA03517
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Wed, 28 Jun 1995 03:19:46 -0400
  3. Received: by apakabar.cc.columbia.edu id AA09921
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Wed, 28 Jun 1995 03:19:43 -0400
  5. Path: news.columbia.edu!panix!news.mathworks.com!europa.chnt.gtegsc.com!howland.reston.ans.net!cs.utexas.edu!news.cs.utah.edu!cc.usu.edu!jrd
  6. From: jrd@cc.usu.edu (Joe Doupnik)
  7. Newsgroups: comp.protocols.kermit.misc
  8. Subject: Re: Testing external errorlevel in MSK 3.14 scripts?
  9. Message-Id: <1995Jun27.145112.54791@cc.usu.edu>
  10. Date: 27 Jun 95 14:51:12 MDT
  11. References: <jhurwitDAquD8.1Mo@netcom.com>
  12. Organization: Utah State University
  13. Lines: 20
  14. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <jhurwitDAquD8.1Mo@netcom.com>, jhurwit@netcom.com (Jeffrey Hurwit) writes:
  17. > Is it possible to test the errorlevel of a program launched from a MSK
  18. > 3.14 script with the "run" command, so that the script can respond to
  19. > the outcome?  I want to have a script run PKUNZIP -t to check the
  20. > integrity of a downloaded archive, and signal the sending kermit to
  21. > resend if it fails.  I saw some mention of a \v(errorlevel) variable
  22. > and a few IF ERRORLEVEL commands in the help file, but it was not clear
  23. > if these refer to the exit status of externally run programs.
  24. -----------
  25.     Alas, no. Errorlevel is a private integer kept deep within DOS
  26. (undoc'd) and it is not visible outside of Command.com. Kermit uses
  27. Command.com to perform the RUN command. .BAT files are handled by 
  28. Command.com, hence can see Errorlevel.
  29.     You can't even write to the DOS Environment within a BAT file
  30. and have the results available to Kermit (even though MSK knows how to
  31. read the Environment) because the BAT file is using only a local copy
  32. of the Env which vanishes with Command.com #2 exits back to Kermit.
  33. About the only thing I can suggest is to write a file somewhere and let 
  34. MSK act on file present/absent, or similar paleolithic o/s technique.
  35.         Joe D.